package com.jueling.culture.core;

/**
 * 响应码枚举，参考HTTP状态码的语义
 * @author linp
 */
public enum ResultCode {
    /**
     * 处理成功
     */
    Success(200,"处理成功"),
    FrontShow(201, "前端显示"),
    setupFail(202, "策略已重置，请重新操作"),
    BadRequest(400, "请求参数有误"),
    Unauthorized(401,"未登录"),
    LoginFail(402, "登录错误"),
    Forbidden(403,"暂无权限"),
    refreshTokenFail(405, "刷新token失败"),
    FailOpen(406,"账号未开通"),
    AutoLoginFail(407,"自动登录失败"),
    TokenExpired(408,"token过期"),
    Fail(500,"服务器异常");

    private final int code;
    private final String msg;

    ResultCode(int code,String msg) {
        this.code = code;
        this.msg=msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
